/**
 * Description:
 * Class Name:Person
 * Date:2022/4/24 13:57
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第14章_Annotation注解._14_4_编译时处理注解;

@Persistent(table = "person_inf")
public class Person {
    @Id(column = "person_id", type = "integer", generator = "identity")
    private int id;
    @Property(column = "person_name", type = "string")
    private String name;
    @Property(column = "person_age", type = "integer")
    private int age;

    // 无参数构造器
    public Person(){}

    // 初始化全部成员变量的构造器
    public Person(int id, String name, int age){
        this.id = id;
        this.name = name;
        this.age = age;
    }

    // 下面是所有成员变量的setter和getter方法

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public int getId() {
        return id;
    }
}
